package com.cherrypt.api.core.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cherrypt.api.model.dataobject.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author intent
 * @date 2019/8/4 13:18
 * @about <link href='http://zzyitj.xyz/'/>
 */
public interface RoleDao extends BaseMapper<Role> {
    @Select(value = "SELECT t_role.* FROM t_user_login, t_role, t_user_role WHERE t_user_login.id = #{uid} AND t_user_login.id = t_user_role.uid AND t_role.id = t_user_role.rid")
    List<Role> selectRoleByUid(int uid);
}
